const {response} = require("./Response");

class BaseController {

    ret(resp, code, message, obj) {
        resp.send({code,message, data : obj});
    }


    success(resp, message , obj) {
        this.ret(resp, response.success, message,obj);
    }
    error(resp, message, obj) {
        this.ret(resp, response.error, message,obj);
    }
}

module.exports = {
    BaseController
}
